package com.fyl.pattern.singleton.demo5;

/**
 * 静态内部类方式
 */
public class Singleton {
    public Singleton() {
    }

    //静态内部类
    private static class SingletonHolder {
        private static final Singleton INSTANCE = new Singleton();
    }
    public static Singleton getInstance(){
        return SingletonHolder.INSTANCE;
    }
}
